<link rel="stylesheet"  type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/tabs.css" />

<?php $this->breadcrumbs=array(
    'Admin'=>array('#'),
    'Wewenang'=>array('index'),
    'Role Management'=>array('index'),
); ?>

<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('ref-authitem-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<ul class="nav nav-tabs" role="tablist" id="myTab">
  <li role="presentation"><a href="<?php echo Yii::app()->createUrl("wewenang/users"); ?>" aria-controls="home" role="tab">User</a></li>
  <li role="presentation" class="active"><a href="<?php echo Yii::app()->createUrl("wewenang/Authitem"); ?>" aria-controls="profile" role="tab">Wewenang</a></li>
</ul>

    <div class="clr"></div>
    <div class="feedbackbox Rights" style="">
        <h1>Wewenang</h1>

        <?php
        $this->widget('bootstrap.widgets.TbGridView', array(
            'id' => 'ref-authitem-grid',
            'dataProvider' => $model->search(),
            'type' => 'striped bordered condensed',
            'template' => '{items}{pager}',
            //'filter'=>$modelKecamatan,
            'columns' => array(
                array(
                    'name' => 'name',
                    'htmlOptions' => array('style'=>'width:40%'),
                ),
                //'name',
                array(
                    'name' => 'description',
                    'htmlOptions' => array('style'=>'width:50%'),
                ),
                //'description',
                //'bizrule',
                //data',
                array(
                    'class' => 'bootstrap.widgets.TbButtonColumn',
                    'template' => '{update} {delete}',
                    'buttons' => array(
                        'update' => array(
                            'label' => 'Update',
                            'url' => 'Yii::app()->createUrl("wewenang/authitem/update", array("name"=>$data->name))',
                            /* INI DICOMMENT UTK SCREENSHOT BY TYO DISURUH DENDY TGL 30/10/2012
                            'options'=>array(
                            'class'=>'btn btn-small update'
                            ),
                            */
                        ),
                        'delete' => array(
                            'label' => 'Delete',
                            'url' => 'Yii::app()->createUrl("wewenang/authitem/delete",array("name"=>$data->name))',
                          /* INI DICOMMENT UTK SCREENSHOT BY TYO DISURUH DENDY TGL 30/10/2012
                            'options'=>array(
                            'class'=>'btn btn-small update'
                            ),
                            */
                        ),
                    ),
                    'htmlOptions' => array('style'=>'width:10%;text-align:center;vertical-align:middle;'),
                )
            ),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'primary',
            'size' => 'medium',
            'label' => 'Tambah',
            'url' => Yii::app()->createUrl('wewenang/Authitem/create'),
            //'htmlOptions' => array('class' => 'update-dialog-create btn-big'),
        ));
        ?>
    </div>
